package com.wei.czz.common.dto.admin.userConfig;

import com.wei.czz.common.tool.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.TreeSet;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2024-07-08 11:22:50
 * className: UserConfigTreeDto
 * version: 1.0
 * description:
 */
@Getter
@Setter
@Accessors(chain = true)
public class UserConfigTreeDto extends BaseEntity implements Comparable<UserConfigTreeDto> {

    /**
     * 主键
     */
    private String id;

    /**
     * 父级主键
     */
    private String parentId;

    /**
     * 配置名称
     */
    private String configName;

    /**
     * 配置键
     */
    private String configKey;

    /**
     * 配置值
     */
    private String configValue;

    /**
     * 排序等级
     */
    private Integer sort;

    /**
     * 子集合
     */
    private TreeSet<UserConfigTreeDto> children;

    @Override
    public int compareTo(UserConfigTreeDto o) {
        return sort.compareTo(o.sort);
    }
}
